
    export default {
        namespaced: true,
        state: {
            isPlaying: false,  
            musicUrl: null // 初始时设为 null 或默认值  
        },
        mutations: {  
            setMusicUrl(state, url) {  
              state.musicUrl = url;  
            },  
            playMusic(state) {  
              if (state.musicUrl) {  
                state.isPlaying = true;  //播放音乐
              }  
            },  
            pauseMusic(state) {  
              state.isPlaying = false;  
              // 暂停音乐  
            }  
          },  
    }